local skynet = require "skynet"
require "skynet.manager"
local Command = require "database.Command"
local Message = require "database.Message"
local Objects = require "Objects"

g_objects = Objects.new()


local function init()
	local message = Message.new()	
	g_objects:add(message)
	local commnad = Command.new(message)
	g_objects:add(commnad)
	g_objects:hotfix("../database")
	skynet.dispatch("lua",message:dispatch())	
end

skynet.start(function()
	init()
	skynet.register(SERVICE_NAME)
end)
